layui.use(['form','jquery','jquery_cookie'], function () {
    var form = layui.form,
        layer = layui.layer,
        $ = layui.jquery,
        $ = layui.jquery_cookie($);

    form.on("submit(saveBtn)",function (data) {
        // console.log(data);

        $.ajax({
            url: ctx+"/user/update_password",
            data: {
                oldPwd: data.field.old_password,
                newPwd: data.field.new_password,
                renewPwd: data.field.again_password
            },
            type: "POST",
            success:function(res){
                // console.log(res)
                if (res.code==200){


                }else{
                    layer.alert(res.msg,{icon:5});
                }
            }
        })

        return false;
    })

})